﻿@namespace BlazorDemo.Pages.CodeSnippets

<CodeSnippetTabbed DocLink="https://docs.devexpress.com/Blazor/DevExpress.Blazor.DxTagBox-2#read-only-state">
    <CodeSnippetTabPage Text="Razor">@(@"<DxTagBox Data=""@Fruits""
          @bind-Values=""@SelectedFruits""
          ReadOnly=""true"">
</DxTagBox>

<DxTagBox Data=""@Fruits""
          @bind-Values=""@SelectedFruits""
          Enabled=""false"">
</DxTagBox>

@code {
    String[] Fruits { get; set; }
    IEnumerable<string> SelectedFruits { get; set; }

    protected override void OnInitialized()
    {
        Fruits = new string[] { ""Apple"", ""Banana"", ""Lemon"", ""Orange"", ""Pear"", ""Pinapple"", ""Peach"" };
        SelectedFruits = new List<string>() { DataSource[1], DataSource[4] };
    }
}")</CodeSnippetTabPage>
</CodeSnippetTabbed>
